from bean.hot_new_message import HotNewMessage
from encoder.hot_news_encoder import HotNewsEncoder
import json


def to_json_str(message: HotNewMessage):
    return json.dumps(message, cls=HotNewsEncoder, indent=4)
